xend: pass-through: Only call setupOneDevice() once per device
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 16 Jun 2009 10:33:23 +0000 (11:33 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 16 Jun 2009 10:33:23 +0000 (11:33 +0100)
As observed by Dexuan Cui, when PCI devices are passed through at
domain-creation-time setupOneDevice() will be called twice.

Once via setupDevice() and once via econfigureDevice() which
is called in pci_device_configure().

This patch removes the first of these.

Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
tools/python/xen/xend/server/pciif.py

index fb182ade5c054e1f3fddda12a5850c5914a43094..b8a60cd1ea3991828933f61e472cdf79dea82bb3 100644 (file)
@@ -436,8 +436,6 @@ class PciController(DevController):
                                     ' same guest with %s'
                                 raise VmError(err_msg % (s, dev.name))
 
-        for (domain, bus, slot, func) in pci_dev_list:
-            self.setupOneDevice(domain, bus, slot, func)
         wPath = '/local/domain/0/backend/pci/%u/0/aerState' % (self.getDomid())
         self.aerStateWatch = xswatch(wPath, self._handleAerStateWatch)
         log.debug('pci: register aer watch %s', wPath)